package com.zhuss.${moudle}.${tablePkg};

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.${moudle}.${tablePkg}.Detail${poEntity}Bo;
import com.zhuss.bean.bo.${moudle}.${tablePkg}.Search${poEntity}Bo;
import com.zhuss.common.ReadService;
import com.zhuss.${moudle}.processor.${poEntity}Read;
import com.zhuss.exception.AabException;

/**
 * @description: ${tableComment}查询Service
 * @author: zhushanshuo
 * @create: ${creatTime}
 **/
@Component("${poEntityLower}ReadService")
public class ${poEntity}ReadService implements ReadService<Object, Object> {
	
	@Autowired
	@Qualifier("${poEntityLower}Read")
	private ${poEntity}Read ${poEntityLower}Read;
	
	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws AabException {
		Detail${poEntity}Bo bo = (Detail${poEntity}Bo) param;
		Long ${poEntityLower}Id = bo.get${poEntity}Id();
		Object vo = ${poEntityLower}Read.detail(${poEntityLower}Id);
		return vo;
	}
	
	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		Search${poEntity}Bo bo = (Search${poEntity}Bo) param;
		Object result = ${poEntityLower}Read.list(bo);
		return result;
	}
	
}

